home *** CD-ROM | disk | FTP | other *** search
/ Halting the Hacker - A P…uide to Computer Security / Halting the Hacker - A Practical Guide to Computer Security.iso / rfc / rfc1846.txt < prev    next >
Text File  |  1997-04-01  |  7KB  |  228 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Network Working Group                                          A. Durand
  8. Request For Comments: 1846                                          IMAG
  9. Category: Experimental                                         F. Dupont
  10.                                                       INRIA Rocquencourt
  11.                                                           September 1995
  12.  
  13.  
  14.                           SMTP 521 Reply Code
  15.  
  16.  
  17. Status of this Memo
  18.  
  19.    This memo defines an Experimental Protocol for the Internet
  20.    community.  This memo does not specify an Internet standard of any
  21.    kind.  Discussion and suggestions for improvement are requested.
  22.    Distribution of this memo is unlimited.
  23.  
  24. Abstract
  25.  
  26.    This memo defines a new Simple Mail Transfer Protocol (SMTP) [1]
  27.    reply code, 521, which one may use to indicate that an Internet host
  28.    does not accept incoming mail.
  29.  
  30. 1. Motivations
  31.  
  32.    Hosts on the Internet have shifted from large, general-purpose hosts
  33.    to smaller, more specialized hosts.  There is an increasing number of
  34.    hosts which are dedicated to specific tasks, such as serving NTP or
  35.    DNS.  These dedicated hosts frequently do not provide mail service.
  36.  
  37.    Usually, these mailless hosts do not run an SMTP server.
  38.    Unfortunately, users will occasionally misaddress mail to these
  39.    hosts.  Regular SMTP clients attempting to deliver this misaddressed
  40.    mail must treat the lack of an SMTP server on the host as a temporary
  41.    error.  They must queue the mail for later delivery, should an SMTP
  42.    server be started at a later time.
  43.  
  44.    This causes the mail to remain queued for days, until it is returned
  45.    with what is usually a confusing error message.
  46.  
  47. 2. Two  complementary solutions
  48.  
  49.    Two complementary solutions MAY be implemented to deal with this
  50.    issue.  The first one is to use MX relays to bounce misaddressed
  51.    mails.  The second one is to implement a  minimal smtp server on the
  52.    mailless host to bounce all mails.
  53.  
  54.    The choice between the two solutions is site dependent.
  55.  
  56.  
  57.  
  58. Durand & Dupont               Experimental                      [Page 1]
  59.  
  60. RFC 1846                  SMTP 521 Reply Code             September 1995
  61.  
  62.  
  63. 3. The MX relays solution
  64.  
  65.    MX relays may be used to indicate SMTP clients that an Internet host
  66.    does not accept mail.
  67.  
  68.    During the SMTP dialog, these MX relays MAY bounce any message
  69.    destinated to this particular host with an SMTP 521 reply code.
  70.  
  71.  
  72.    SMTP dialog example:
  73.  
  74.    ---> 220 relay.imag.fr ready
  75.    <--- HELO client.inria.fr
  76.    ---> 250 relay.imag.fr Hello client.inria.fr
  77.    <--- MAIL FROM: <user1@client.inria.fr>
  78.    ---> 250 <user1@client.inria.fr>... Sender Ok
  79.    <--- RCPT TO: <user2@nomail.imag.fr>
  80.    ---> 521 nomail.imag.fr does not accept mail
  81.    <--- QUIT
  82.    ---> 221 relay.imag.fr closing connection
  83.  
  84.    If an MX relay of precedence n for a mailless host bounces mails on
  85.    its behalf, then any other MX relay of precedence lower than n for
  86.    this mailless host SHOULD do the same.
  87.  
  88. 4. The SMTP server solution
  89.  
  90. 4.1 521 greeting
  91.  
  92.    A host may indicate that it does not accept mail by sending an
  93.    initial 521 "Host does not accept mail" reply to an incoming SMTP
  94.    connection.  The official name of the server host or its IP address
  95.    MUST be sent as the first word following the reply code.
  96.  
  97.    For example: 521 canon.inria.fr does not accept mail
  98.  
  99. 4.2 SMTP dialog
  100.  
  101.    After issuing the initial 521 reply, the server host MUST do one of
  102.    the following two options:
  103.  
  104.    a) Close the SMTP connection.
  105.    b) Read commands, issuing 521 replies to all commands except QUIT.
  106.       If the SMTP client does not issue the QUIT command after a
  107.       reasonable time, the SMTP server MUST time out and close the
  108.       connection.  A suggested time-out value is 5 minutes.
  109.  
  110.  
  111.  
  112.  
  113.  
  114. Durand & Dupont               Experimental                      [Page 2]
  115.  
  116. RFC 1846                  SMTP 521 Reply Code             September 1995
  117.  
  118.  
  119.    DISCUSSION:
  120.  
  121.    When an SMTP server closes the connection immediatly after issuing
  122.    the initial 521 reply, some existing SMTP clients treat the
  123.    condition as a transient error and requeue the mail for later
  124.    delivery.  If the SMTP server leaves the connection open, those
  125.    clients immediately send the QUIT command and return the mail.
  126.  
  127. 4.3 MX
  128.  
  129.    A host which sends a 521 greeting message MUST NOT be listed as an MX
  130.    record for any domain.
  131.  
  132. 4.4 Postmaster
  133.  
  134.    An SMTP server which sends a 521 greeting message IS NOT subject to
  135.    the postmaster requirement of STD 3, RFC 1123 ([2]).
  136.  
  137.    DISCUSSION:
  138.  
  139.    Postmaster exists so you can report mail errors.  A host that doesn't
  140.    support mail doesn't need a Postmaster.
  141.  
  142. 5. SMTP client behavior
  143.  
  144.    If an SMTP client encounters a host in an MX record that issues a 521
  145.    greeting message, it must do one of the following two options:
  146.  
  147.    a) Attempt to deliver it to a different MX host for that domain.
  148.    b) Return the mail with an appropriate non-delivery report.
  149.  
  150.    If an SMTP client encounters a 521 reply code in any other part of
  151.    the SMTP dialog, it MUST return the mail with an appropriate non-
  152.    delivery report.
  153.  
  154. 6. Security Considerations
  155.  
  156.    Not running any SMTP server, or running an SMTP server which simply
  157.    emits fixed strings in response to incoming connection should provide
  158.    significantly fewer opportunities for security problems than running
  159.    a complete SMTP implementation.
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170. Durand & Dupont               Experimental                      [Page 3]
  171.  
  172. RFC 1846                  SMTP 521 Reply Code             September 1995
  173.  
  174.  
  175. 7. Authors' Addresses
  176.  
  177.    Alain Durand
  178.    Institut de Mathematiques Appliquees de Grenoble (IMAG)
  179.    BP 53 38041 Grenoble CEDEX 9 France
  180.  
  181.    Phone : +33 76 63 57 03
  182.    Fax   : +33 76 44 66 75
  183.    EMail: Alain.Durand@imag.fr
  184.  
  185.  
  186.    Francis Dupont
  187.    Institut National de Recherche en Informatique et en Automatique
  188.    B.P. 105 / 78153 Le Chesnay CEDEX France
  189.  
  190.    Phone : +33 1 39 63 52 13
  191.    Fax   : +33 1 39 63 53 30
  192.    EMail: Francis.Dupont@inria.fr
  193.  
  194. 8. Expericences
  195.  
  196.    People implementing this reply code are suggested to send a message
  197.    to mailext@list.cren.net to report their experience.
  198.  
  199. 9. References
  200.  
  201.    [1] Postel, J., "Simple Mail Transfer Protocol", STD 10, RFC 821,
  202.        USC/Information Sciences Institute, August 1982.
  203.  
  204.    [2] Braden, R., Editor, "Requirements for Internet Hosts -
  205.        Application and Support", STD 3, RFC 1123, USC/Information
  206.        Sciences Institute, October 1989.
  207.  
  208.  
  209.  
  210.  
  211.  
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226. Durand & Dupont               Experimental                      [Page 4]
  227.  
  228.